Skip to content

Otel collector integration#519

Merged
M4itee merged 13 commits intomasterfrom
otel-collector-integration
Feb 25, 2026
Merged

Otel collector integration#519
M4itee merged 13 commits intomasterfrom
otel-collector-integration

Conversation

@M4itee
Copy link
Contributor

@M4itee M4itee commented Jan 23, 2026

Adding ability to get otel metrics from the kubernetes

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Mateusz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds OpenTelemetry Collector integration to the Netdata Helm chart, enabling the collection of logs from Kubernetes pods and forwarding them to a netdata instance via OTLP protocol.

Changes:

  • Added netdataOpentelemetry deployment and service for receiving OTLP data
  • Integrated opentelemetry-collector as a subchart dependency for collecting Kubernetes logs
  • Fixed YAML indentation issues in ingress hosts and child tolerations configurations

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
charts/netdata/values.yaml Added netdataOpentelemetry configuration section and otel-collector subchart settings; fixed indentation issues
charts/netdata/templates/netdata-otel/service.yaml Created service to expose OTLP endpoint on port 4317
charts/netdata/templates/netdata-otel/secrets.yaml Created secrets template for OTEL configuration
charts/netdata/templates/netdata-otel/persistentvolumeclaim.yaml Created PVC for OTEL log storage
charts/netdata/templates/netdata-otel/deployment.yaml Created deployment for netdata instance with OTEL plugin enabled
charts/netdata/templates/netdata-otel/configmap.yaml Created configmap template for OTEL configuration
charts/netdata/templates/_helpers.tpl Added helper templates for netdataOpentelemetry configs management
charts/netdata/Chart.yaml Added opentelemetry-collector subchart dependency
charts/netdata/Chart.lock Generated lock file for subchart dependency
charts/netdata/charts/opentelemetry-collector-0.115.0.tgz Added OpenTelemetry Collector subchart package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ilyam8
Copy link
Member

ilyam8 commented Jan 24, 2026

@cubic-dev-ai review this PR

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 10 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@witalisoft witalisoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure that otel is also enabled when we are running checks

@M4itee M4itee force-pushed the otel-collector-integration branch 3 times, most recently from 5c3757b to 4b1dbb2 Compare January 30, 2026 14:28

The following table lists the configurable parameters of the netdata chart and their default values.

{{ template "chart.valuesTableHtml" . }}
Copy link
Contributor Author

@M4itee M4itee Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTML because it renders better the multiline comments and values + adds some extra feats like copy, colors. Any markdown parser will render it no problem anyway.

- name: Run chart-testing (install)
run: ct install --target-branch ${{ github.event.repository.default_branch }}

- name: Run chart-testing (install with OpenTelemetry)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an extra for easier problem catching, in theory we can just use this one and delete the regular install. Good thing is that at the end of the ct install there is a cleanup so they are both independent.

@M4itee
Copy link
Contributor Author

M4itee commented Jan 30, 2026

Last thing left for now is to make docs a bit more readable, after that it should be ready for review

@M4itee M4itee force-pushed the otel-collector-integration branch 5 times, most recently from 73258ee to 138f84e Compare January 30, 2026 17:16
@ilyam8 ilyam8 requested a review from Copilot January 30, 2026 18:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@M4itee M4itee force-pushed the otel-collector-integration branch 6 times, most recently from abfbb32 to 8705505 Compare February 2, 2026 12:35
@M4itee M4itee force-pushed the otel-collector-integration branch from 8760d58 to f7bb9e2 Compare February 23, 2026 11:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1100 to +1103
# OpenTelemetry Collector subchart configuration
# This is an optional component that allows to gather logs from k8s cluster (in this configuration).
# If you already have an exporter of any kind, just point it to the netdata-otel service
# Documentation: https://opentelemetry.io/docs/platforms/kubernetes/helm/collector/
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says it adds the ability to get OpenTelemetry metrics from Kubernetes, but the otel-collector default config here only defines a logs pipeline (no metrics pipeline/receivers). Either update the PR description to mention logs collection, or extend the collector configuration to actually collect/export metrics as well.

Copilot uses AI. Check for mistakes.
path: /etc/netdata/otel.yaml
data: |
endpoint:
path: "0.0.0.0:4317"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

netdataOpentelemetry.service.port is configurable and used by the Service/Deployment, but the generated otel.yaml config hard-codes the listener as 0.0.0.0:4317. If a user changes the service/container port, Netdata will still listen on 4317 and OTLP traffic will fail. Make the endpoint.path value reference .Values.netdataOpentelemetry.service.port (and keep it rendered via tpl) so the config stays consistent with the Service port.

Suggested change
path: "0.0.0.0:4317"
path: {{ tpl (printf "\"0.0.0.0:%v\"" .Values.netdataOpentelemetry.service.port) . }}

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@M4itee, should we fix this?

Copy link
Contributor Author

@M4itee M4itee Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I'm fine either way. I think it makes it touch less readable but automates the whole thing. Also I'm not sure if it will work this way correctly (I think printf alone will work) although I'm also not sure if it will work correctly though it will be easy enough to test - will it have a problem with delclaration as a number vs a as string of the port number. I'll leave decision up to you @ilyam8 .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is true

If a user changes the service/container port, Netdata will still listen on 4317 and OTLP traffic will fail.

we should fix this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I checked what we are doing with the parent port. I will fix it, it should be the same.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Disabled by default:

- A Netdata restarter `CronJob`. Its main purpose is to automatically update Netdata when using nightly releases.
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README template should document the new OpenTelemetry integration features (netdataOpentelemetry deployment and otel-collector subchart) in the "Disabled by default" section, similar to how the restarter CronJob is documented. This would help users discover these features and understand what optional components are available.

Suggested change
- A Netdata restarter `CronJob`. Its main purpose is to automatically update Netdata when using nightly releases.
- A Netdata restarter `CronJob`. Its main purpose is to automatically update Netdata when using nightly releases.
- A Netdata OpenTelemetry collector `Deployment` (`netdataOpentelemetry`) for exposing Netdata metrics via OTLP to external observability backends.
- An optional `otel-collector` subchart that deploys a configurable OpenTelemetry Collector instance for advanced pipelines and exporting data to third-party systems.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

thiagoftsm
thiagoftsm previously approved these changes Feb 23, 2026
witalisoft
witalisoft previously approved these changes Feb 24, 2026
@M4itee M4itee dismissed stale reviews from witalisoft and thiagoftsm via 77344a0 February 25, 2026 11:15
@M4itee M4itee merged commit cc418a7 into master Feb 25, 2026
2 of 3 checks passed
@M4itee M4itee deleted the otel-collector-integration branch February 25, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants